<template>
  <el-menu :default-active="activeIndex" mode="horizontal">
    <el-menu-item @click="to('flowInfo')" index="flowInfo"
      >流程信息</el-menu-item
    >
    <el-menu-item @click="to('formDesign')" index="formDesign"
      >审批表单</el-menu-item
    >
    <el-menu-item @click="to('processDesign')" index="processDesign"
      >审批流程</el-menu-item
    >
  </el-menu>
</template>

<script>
export default {
  props: {
    activeIndex: {
      type: String,
      default: 'formDesign',
    },
  },
  methods: {
    // 传index给父组件显示对应内容
    to(path) {
      this.$emit('input', path);
    },
  },
};
</script>

<style lang="less" scoped>
.el-menu {
  display: flex;
  justify-content: center;
  width: 100vw;
}
</style>
